package fr.umlv.jee.jawp.persistence.object;

public enum Status {

	KART("kart"),
	ORDERED("ordered"),
	PAYED("payed"),
	PREPARED("prepared"),
	SENT("sent"),
	DELAYED("delayed");
	
	public String name;
	
	private Status(String name) {
		this.name = name;
	}
	
	public static Status getFromName(String name){
		if(name.equals("kart")) return KART;
		if(name.equals("ordered")) return ORDERED;
		if(name.equals("payed"))return PAYED;
		if(name.equals("prepared")) return PREPARED;
		if(name.equals("sent")) return SENT;
		if(name.equals("delayed")) return DELAYED;
		return null;
	}
	
	public String getName(){
		return name;
	}
}
